package com.yonyou.service.impl;

import com.yonyou.service.IDataSourceXml;
import com.yonyou.xmlAndExcel.SapXMLRead;
import com.yonyou.xmlAndExcel.XMLWrite;
import java.util.HashMap;

public class DataSourceXmlImpl
  implements IDataSourceXml
{
  private SapXMLRead xmlRead;
  private XMLWrite xmlWrite;

  public DataSourceXmlImpl()
  {
    this.xmlRead = new SapXMLRead();
    this.xmlWrite = new XMLWrite();
  }

  public HashMap<String, String> dataSourceXmlRead()
  {
    HashMap dataSourceMap = this.xmlRead.readDataSourceXml();
    return dataSourceMap;
  }

  public boolean dataSourceXmlWrite(String username, String password, String ipaddress, String dataName)
  {
    return this.xmlWrite.creatDataSoureXml(username, password, ipaddress, dataName);
  }
}